package com.dfrz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 29877
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class VideoDetail {
    @TableId(value ="detail_id" , type = IdType.AUTO)       //自动增长（mybatis-plus使用）
    private Integer detailId;
    private String detailTitle;
    private Integer detailNum;                  // 第几话？
    private Integer checkStatus;                //审核状态，0未审核，1审核通过，-1审核未通过
    private Integer detailType;                 // 博主发的视频和管理员发的视频分类
    private Integer videoUid;
    private String detailImg;               //每一话的封面图片
    private String detailUrl;               //每一话的视频存放地址
    private Integer needVip;                 //是否需要会员

    //搜索功能时使用
    @TableField(exist = false)
    private String username;
    @TableField(exist = false)
    private String videoTime;

    //用户视频详情页需使用
    @TableField(exist = false)
    private String profilepic;
    @TableField(exist = false)
    private String videoIntro;

    //管理员发布视频详情构造器
    public VideoDetail(String detailTitle, Integer detailNum, Integer checkStatus,
                       Integer detailType, Integer videoUid, Integer needVip  ) {
        this.detailTitle = detailTitle;
        this.detailNum = detailNum;
        this.checkStatus = checkStatus;
        this.detailType = detailType;
        this.videoUid = videoUid;
        this.needVip = needVip;
    }
    //普通用户发布视频详情构造器
    public VideoDetail(Integer checkStatus, Integer detailType, Integer videoUid, String detailUrl,String imgUrl) {
        this.checkStatus = checkStatus;
        this.detailType = detailType;
        this.videoUid = videoUid;
        this.detailUrl = detailUrl;
        this.detailImg = imgUrl;
    }

}
